<!--
 * @Description: 无数据时的组件
 * @Date: 2021-07-11 22:26:52
 * @LastEditTime: 2021-09-17 21:26:01
 * @FilePath: \vue-h5\src\components\NoData.vue
-->
<template>
  <div class="no-data" v-if="isNoData">
    <div class="icon"></div>
    <div class="text"><slot></slot></div>
  </div>
</template>
<script>
export default {
  props: ['isNoData']
};
</script>
<style lang="less" scoped>
  .no-data{
    padding-top: 40%;
    .icon{
      width: 128px;
      height: 128px;
      background: url(../assets/images/no-data.png) no-repeat center center;
      background-size: 128px;
      margin: 0 auto;
    }
    .text{
      font-size: 28px;
      text-align: center;
      color: #666;
      padding-top: 20px
    }
  }
</style>

